import 'package:flutter/material.dart';
import 'package:get/get.dart';

class PledgeDetail extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          backgroundColor: Color(0xffffffff),
        ),
        body: Column(
          children: [
            Expanded(
                child: ListView(
              children: [
                Image.asset('static/aaa.png'),
                SizedBox(
                  height: 15,
                ),
                Padding(
                    padding: EdgeInsets.symmetric(horizontal: 15),
                    child: Column(
                      crossAxisAlignment: CrossAxisAlignment.start,
                      children: [
                        Text(
                          '限量1000份，流通100份',
                          style:
                              TextStyle(fontSize: 14, color: Color(0XFF1F0584)),
                        ),
                        Text(
                          '超现实元宇宙数字艺术展厅',
                          style:
                              TextStyle(fontSize: 22, color: Color(0XFF0F172B)),
                        ),
                        SizedBox(
                          height: 20,
                        ),
                        Row(
                          mainAxisAlignment: MainAxisAlignment.spaceBetween,
                          children: [
                            Column(
                              crossAxisAlignment: CrossAxisAlignment.start,
                              children: [
                                Text(
                                  '质押条件',
                                  style: TextStyle(
                                      fontSize: 11, color: Color(0XFF999999)),
                                ),
                                Text(
                                  '2/2已达成',
                                  style: TextStyle(
                                      fontSize: 12,
                                      color: Color(0XFF0F172B),
                                      fontWeight: FontWeight.bold),
                                ),
                              ],
                            ),
                            Column(
                              crossAxisAlignment: CrossAxisAlignment.start,
                              children: [
                                Text(
                                  '质押周期',
                                  style: TextStyle(
                                      fontSize: 12, color: Color(0XFF999999)),
                                ),
                                Text(
                                  '7天/10天/15天',
                                  style: TextStyle(
                                      fontSize: 14,
                                      color: Color(0XFF0F172B),
                                      fontWeight: FontWeight.bold),
                                ),
                              ],
                            ),
                            Column(
                              crossAxisAlignment: CrossAxisAlignment.start,
                              children: [
                                Text(
                                  '质押收益',
                                  style: TextStyle(
                                      fontSize: 12, color: Color(0XFF999999)),
                                ),
                                Text(
                                  '8%/12%/16%',
                                  style: TextStyle(
                                      fontSize: 14,
                                      color: Color(0XFF0F172B),
                                      fontWeight: FontWeight.bold),
                                ),
                              ],
                            ),
                          ],
                        ),
                        SizedBox(
                          height: 30,
                        ),
                        Text(
                          '质押条件',
                          style: TextStyle(
                              fontSize: 18, fontWeight: FontWeight.bold),
                        ),
                        Container(
                          margin: EdgeInsets.only(top: 10),
                          padding: EdgeInsets.symmetric(
                              horizontal: 15, vertical: 10),
                          decoration: BoxDecoration(
                              color: Color(0XFFF8F9FD),
                              borderRadius: BorderRadius.circular(10)),
                          child: Row(
                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
                            children: [
                              Text('拥有藏品《土地》*1'),
                              Text(
                                '去购买',
                                style: TextStyle(
                                    fontSize: 12,
                                    color: Color(0XFF0F172B),
                                    fontWeight: FontWeight.bold),
                              ),
                            ],
                          ),
                        ),
                        SizedBox(
                          height: 30,
                        ),
                        Text(
                          '质押组合',
                          style: TextStyle(
                              fontSize: 18, fontWeight: FontWeight.bold),
                        ),
                        Container(
                            margin: EdgeInsets.only(top: 10, bottom: 30),
                            padding: EdgeInsets.symmetric(
                                horizontal: 15, vertical: 10),
                            decoration: BoxDecoration(
                                color: Color(0XFFF8F9FD),
                                borderRadius: BorderRadius.circular(10)),
                            child: Column(
                              children: [
                                Row(
                                  children: [
                                    ClipRRect(
                                      borderRadius:
                                          BorderRadius.circular(5.0), // 设置圆角大小
                                      child: Image.asset(
                                        'static/aaa.png',
                                        width: 28,
                                        height: 28,
                                        fit: BoxFit.fill,
                                      ),
                                    ),
                                    SizedBox(
                                      width: 10,
                                    ),
                                    Text('拥有藏品《土地》*1'),
                                    Expanded(child: SizedBox()),
                                    Text(
                                      '拥有21',
                                      style: TextStyle(
                                          fontSize: 12,
                                          color: Color(0XFF0F172B)),
                                    ),
                                  ],
                                ),
                                SizedBox(height: 10,),
                                Row(
                                  children: [
                                    ClipRRect(
                                      borderRadius:
                                          BorderRadius.circular(5.0), // 设置圆角大小
                                      child: Image.asset(
                                        'static/aaa.png',
                                        width: 28,
                                        height: 28,
                                        fit: BoxFit.fill,
                                      ),
                                    ),
                                    SizedBox(
                                      width: 10,
                                    ),
                                    Text('拥有藏品《土地》*1'),
                                    Expanded(child: SizedBox()),
                                    Text(
                                      '拥有21',
                                      style: TextStyle(
                                          fontSize: 12,
                                          color: Color(0XFF0F172B)),
                                    ),
                                  ],
                                ),
                              ],
                            )),
                       
                        SizedBox(
                          height: 10,
                        ),
                        Text(
                          '质押说明',
                          style: TextStyle(
                              fontSize: 18, fontWeight: FontWeight.bold),
                        ),
                        SizedBox(
                          height: 5,
                        ),
                        Text(
                          '数字藏品交易仅限于18周岁(不含)以上、60周岁(含)以下，并已完成实名认证的中国大陆用户购买。由于不同属性的数字艺术有不同的二次交易规则，请您仔细阅读并同意相关规则后再进行相应操作，以避免不必要的损失。 请注意，一旦数字藏品完成出售，不支持退货在购买之前，请仔细考虑您的购买决策。根据我国相关的法律要求，特定条件下的数字藏品的二次交易不支持任何形式的变相炒作。我们坚决反对数字藏品炒作、场外交易、欺诈，以及其他非法侵权行为。请您甄别上述涉嫌网络欺诈的行为并了解相关风险。',
                          style:
                              TextStyle(fontSize: 12, color: Color(0XFF999999)),
                        ),
                        SizedBox(
                          height: 15,
                        ),
                      ],
                    )),
              ],
            )),

// Expanded(child: SizedBox()),
            Container(
                margin: EdgeInsets.symmetric(horizontal: 15),
                height: 50,
                decoration: BoxDecoration(
                    color: Color(0XFF0F172B),
                    borderRadius: BorderRadius.circular(50)),
                child: Row(
                  mainAxisAlignment: MainAxisAlignment.center,
                  children: [
                    GestureDetector(
                      onTap: () => {
                        Get.bottomSheet(
                            isScrollControlled: true,
                            shape: RoundedRectangleBorder(
                              // 圆角设置:ml-citation{ref="7" data="citationList"}
                              borderRadius: BorderRadius.vertical(
                                  top: Radius.circular(10)),
                            ),
                            backgroundColor: Colors.white,
                            Container(
                              height: 500,
                              padding: EdgeInsets.symmetric(horizontal: 15),
                              child: Column(
                                crossAxisAlignment: CrossAxisAlignment.start,
                                children: [
                                  SizedBox(
                                    height: 15,
                                  ),
                                  Row(
                                    mainAxisAlignment:
                                        MainAxisAlignment.spaceBetween,
                                    children: [
                                      Text(
                                        '质押',
                                        style: TextStyle(fontSize: 20),
                                      ),
                                      Image.asset(
                                        'static/close.png',
                                        width: 18,
                                        fit: BoxFit.fitWidth,
                                      )
                                    ],
                                  ),
                                  Text(
                                    '未到期赎回奖励不发放',
                                    style: TextStyle(
                                        fontSize: 14, color: Color(0XFF999999)),
                                  ),
                                  SizedBox(
                                    height: 20,
                                  ),
                                  Text('质押周期',style: TextStyle(fontSize: 14,color: Color(0XFF999999))),
                                  Row(
                                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
                                   children: [
                                    Expanded(child: 
                                    Container(
                                      padding: EdgeInsets.symmetric(vertical: 6),
                                        decoration: BoxDecoration(
                                          color: Color(0XFFF8F9FD),
                                          borderRadius: BorderRadius.circular(7)
                                        ),
                                        child: Column(
                                          children: [
                                          Text('7天',style: TextStyle(fontSize: 16,color: Color(0XFF999999))),
                                          Row(
                                          mainAxisAlignment: MainAxisAlignment.center,
                                            children: [
                                          Text('8%',style: TextStyle(fontSize: 12,color: Color(0XFF542AFF))),
                                          Text('收益',style: TextStyle(fontSize: 12,color: Color(0XFF0F172B))),
                                            ],
                                          )
                                          ],
                                        ),
                                      )
                                    ),
                                    SizedBox(width: 10,),
                                    Expanded(child: 
                                    Container(
                                      padding: EdgeInsets.symmetric(vertical: 6),
                                        decoration: BoxDecoration(
                                          color: Color(0XFFF8F9FD),
                                          borderRadius: BorderRadius.circular(7)
                                        ),
                                        child: Column(
                                          children: [
                                          Text('7天',style: TextStyle(fontSize: 16,color: Color(0XFF999999))),
                                          Row(
                                          mainAxisAlignment: MainAxisAlignment.center,

                                            children: [
                                          Text('8%',style: TextStyle(fontSize: 12,color: Color(0XFF542AFF))),
                                          Text('收益',style: TextStyle(fontSize: 12,color: Color(0XFF0F172B))),
                                            ],
                                          )
                                          ],
                                        ),
                                      )
                                    ),
                                    SizedBox(width: 10,),
                                    Expanded(child: 
                                    Container(
                                      padding: EdgeInsets.symmetric(vertical: 6),
                                        decoration: BoxDecoration(
                                          color: Color(0XFFF8F9FD),
                                          borderRadius: BorderRadius.circular(7)
                                        ),
                                        child: Column(
                                          children: [
                                          Text('7天',style: TextStyle(fontSize: 16,color: Color(0XFF999999))),
                                          Row(
                                          mainAxisAlignment: MainAxisAlignment.center,

                                            children: [
                                          Text('8%',style: TextStyle(fontSize: 12,color: Color(0XFF542AFF))),
                                          Text('收益',style: TextStyle(fontSize: 12,color: Color(0XFF0F172B))),
                                            ],
                                          )
                                          ],
                                        ),
                                      )
                                    ),
                                     
                                     
                                    ]
                                  ,),


                                  SizedBox(
                                    height: 20,
                                  ),
                                  Container(
                                    decoration: BoxDecoration(
                                      borderRadius: BorderRadius.circular(10),
                                      color: Color(0XFFF8F9FD),
                                    ),
                                    child: Row(
                                      children: [
                                        ClipRRect(
                                          borderRadius: BorderRadius.only(
                                              topLeft: Radius.circular(10),
                                              bottomLeft: Radius.circular(
                                                  10)), // 设置圆角大小
                                          child: Image.asset(
                                            'static/aaa.png',
                                            width: 70,
                                            height: 70,
                                            fit: BoxFit.fill,
                                          ),
                                        ),
                                        SizedBox(
                                          width: 10,
                                        ),
                                        Column(
                                          crossAxisAlignment:
                                              CrossAxisAlignment.start,
                                          children: [
                                            Text(
                                              '1000平方土地',
                                              style: TextStyle(
                                                  fontSize: 14,
                                                  color: Color(0XFF0F172B),
                                                  fontWeight: FontWeight.bold),
                                            ),
                                            SizedBox(
                                              height: 10,
                                            ),
                                            Row(
                                              children: [
                                                SizedBox(
                                                  width: 76,
                                                  child:
                                                      LinearProgressIndicator(
                                                    borderRadius:
                                                        BorderRadius.circular(
                                                            5),
                                                    value:
                                                        0.5, // 进度值，范围从0.0到1.0
                                                    backgroundColor: Colors
                                                        .grey[300], // 背景颜色
                                                    valueColor:
                                                        AlwaysStoppedAnimation<
                                                                Color>(
                                                            Color(
                                                                0XFF0F172B)), // 进度条颜色
                                                  ),
                                                ),
                                                Text('23/23')
                                              ],
                                            )
                                          ],
                                        ),
                                        Expanded(child: SizedBox()),
                                        Image.asset(
                                          'static/qiehuan.png',
                                          width: 50,
                                          fit: BoxFit.fitWidth,
                                        ),
                                        SizedBox(
                                          width: 16,
                                        ),
                                      ],
                                    ),
                                  ),
                                  Expanded(child: SizedBox()),
                                  GestureDetector(
                                    onTap: () => {
                                      Get.dialog(
                                        AlertDialog(
                                          backgroundColor: Colors.transparent,
                                          content: Stack(
                                            children: [
                                              Image.asset(
                                                'static/web/hesuu.png',
                                                width: 250,
                                                fit: BoxFit.fitWidth,
                                              ),
                                              Positioned(
                                                  top: 130,
                                                  left: 0,
                                                  right: 0,
                                                  child: Align(
                                                      child: Column(
                                                    children: [
                                                      Text(
                                                        '质押成功',
                                                        style: TextStyle(
                                                            fontSize: 24,
                                                            fontWeight:
                                                                FontWeight
                                                                    .bold),
                                                      ),
                                                      SizedBox(
                                                        height: 15,
                                                      ),
                                                      Text(
                                                        '未到期赎回奖励不发放',
                                                        style: TextStyle(
                                                            fontSize: 14,
                                                            fontWeight:
                                                                FontWeight
                                                                    .bold),
                                                      ),
                                                      Container(
                                                        height: 50,
                                                        margin: EdgeInsets.only(top: 50),
                                                        alignment: Alignment.center,
                                                        width: 210,
                                                        decoration: BoxDecoration(
                                                          color: Color(0XFF0F172B),
                                                          borderRadius: BorderRadius.circular(50)
                                                        ),
                                                      child: Text('确认',style: TextStyle(fontSize: 16,color: Color(0XFFFFFFFF))),
                                                      )
                                                    ],
                                                  )))
                                            ],
                                          ),
                                        ),
                                      )
                                    },
                                    child: Container(
                                      height: 50,
                                      alignment: Alignment.center,
                                      decoration: BoxDecoration(
                                          color: Color(0XFF0F172B),
                                          borderRadius:
                                              BorderRadius.circular(50)),
                                      child: Text(
                                        '立即质押',
                                        style: TextStyle(
                                            fontSize: 18,
                                            color: Color(0XFFFFFFFF)),
                                      ),
                                    ),
                                  )
                                ],
                              ),
                            ))
                      
                      },
                      child: Text(
                        '质押',
                        style:
                            TextStyle(fontSize: 18, color: Color(0XFFFFFFFF)),
                      ),
                    ),
                  ],
                ))
          ],
        ));
  }
}
